import java.util.Scanner;

/**
 * Created by dllo on 18/3/28.
 */
public class Question02 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第一个数字");
        int a = scanner.nextInt();
        System.out.println("请输入第二个数字");
        int b = scanner.nextInt();
        System.out.println("请输入第三个数字");
        int c = scanner.nextInt();

        /*
        int max = a;
        if (max < b) {
            max = b;
        }
        if (max < c) {
            max = c;
        }

        int min = a;
        if (min > b) {
            min = b;
        }
        if (min > c) {
            min = c;
        }
        丰神写的
        */

        if (a >= b && b >= c) {
            System.out.println("最大值是:" + a + "最小值是:" + c);
        } else {
            if (a <= b && b <= c) {
                System.out.println("最大值是:" + c + "最小值是:" + a);
            } else {
                if (b >= a && a >= c) {
                    System.out.println("最大值是:" + b + "最小值是:" + c);
                } else {
                    if (b <= a && a <= c) {
                        System.out.println("最大值是:" + c + "最小值是:" + b);
                    } else {
                        if (b <= c && c <= a) {
                            System.out.println("最大值是:" + a + "最小值是:" + b);
                        } else {
                            if (b >= c && c >= a) {
                                System.out.println("最大值是:" + b + "最小值是:" + a);
                            }
                        }
                    }
                }
            }
        }
    }
}
